package com.zggk.iroad.handle.handlemx;

import android.app.Activity;
import android.content.Context;

import com.alibaba.fastjson.JSON;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import com.lzy.okgo.model.Response;
import com.zggk.iroad.api.Urls;
import com.zggk.iroad.callback.StringDialogCallback;
import com.zggk.iroad.diease.dieasemx.DieaseMxBean;
import com.zggk.iroad.mvp.BasePresenterImpl;

/**
 * MVPPlugin
 *  邮箱 784787081@qq.com
 */

public class HandleMxPresenter extends BasePresenterImpl<HandleMxContract.View> implements HandleMxContract.Presenter{
    @Override
    public void testinfo(Activity activity,String RZID) {
        OkGo.<String>get(Urls.YNIP + "QueryBhmxByys")
                .params("BHID", RZID)
                .execute(new StringDialogCallback(activity) {
                    @Override
                    public void onSuccess(Response<String> response) {
                        HandleMxBean videoVos2 = JSON.parseObject(response.body(), HandleMxBean.class);
                        if (videoVos2.getState().equals("1")){
                            mView.getData(videoVos2);
                        }
                    }
                });
    }
}
